import java.util.Scanner;

public class a038_數字翻轉 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input, output;
		int length_input;
		
		char input_each;
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			
			output = "";
			
			length_input = input.length();
			for(int i = length_input; i > 0; i--) {
				input_each = input.charAt(i - 1);
				
				output += input_each;
			}
			
			for(int i = 0; i < output.length(); i++) {
				input_each = output.charAt(i);
				
				if(input_each == '0') {
					if(i == output.length() - 1)
						output = "0";
					
					continue;
				}
				else {
					output = output.substring(i, output.length());
					break;
				}
			}
			
			System.out.println(output);
		}
	} // main
	
}